<template>
  <div class="about">
    <h1>This is an about page</h1>

    <ul>
      <li v-for="item in cart" :key="item.id">{{ item.name }}</li>
    </ul>

    <button @click="checkout">清空</button>
  </div>
</template>

<script>
import { mapState, mapActions } from 'vuex'

export default {
  computed: {
    ...mapState(['cart'])
  },

  methods: {
    ...mapActions(['checkout'])
  }
}
</script>
